
/*
 * GET home page.
 */

exports.load = function(req, res){
  var value = req.params.id;
  var selected = req.params.selected;
  var output = "";
  if(value==1){
    users=["--Select--","Head","Assistant Head"];
  }else if(value==2){
    users=["--Select--","Senior Developer","Junior Developer", "Project Manager", "CFO", "CEO"];
  }else if(value==3){
    users=["--Select--","Stephen Cury","Harrison Barnes", "Kent Bazemore", "Andris Biedrins", "Andrew Bogut", "Festus Ezeli", "Draymond Green"];
  }else{
    users=["--Select--"];
  }
  for(var id in users){
    output += "<option id='"+id+"' value='"+users[id]+"' "+selectedOption(selected,id)+">"+users[id]+"</option>";
  }
  res.send(output);
};
function selectedOption(selected_id,id){
  if(selected_id==id){
    return "selected='selected'";
  }else{
    return "";
  }
}